package test0824;

import java.util.Scanner;

public class Test01 {
    public static void main(String[] args) {
        Scanner str = new Scanner(System.in);
        System.out.println("请输入年龄:");
        String s = str.nextLine();
        boolean match = s.matches("18");
        if(match){
            System.out.println(s);
        }else{
            System.out.println("有误");
        }


        Scanner scan = new Scanner(System.in);
        System.out.println("请输入用户名:");
        String st = scan.nextLine();
        boolean t = st.matches("huekal_1q");
        if(t){
            System.out.println(t);
        }else{
            System.out.println("有误");
        }





    }
}
